package com.quantanetwork.esm.port;

/**
* Company: QuantaNetwork BeiJing Ltd
* Author : 张彦龙
* DateTime: Nov 25, 2008  4:08:25 PM
*/
public class PortInfoBean
{
	//Server
	private String server;
	//端口
	private int port = -1;
	//描述
	private String desc;
	//端口类型
	private String type;
	//漏洞提示
	private String advice;
	//测试响应
	private String response;

	public String getResponse()
	{
		String rtnVal = "";
		if (response != null)
		{
			rtnVal = response;
		}
		return rtnVal;
	}

	public void setResponse(String response)
	{
		this.response = response;
	}

	public PortInfoBean(String server, int port)
	{
		super();
		this.server = server;
		this.port = port;
	}

	public String getAdvice()
	{
		return advice;
	}

	public void setAdvice(String advice)
	{
		this.advice = advice;
	}

	public PortInfoBean(String desc)
	{
		this.desc = desc;
	}

	public PortInfoBean()
	{
	}

	public PortInfoBean(String server, int port, String type)
	{
		super();
		this.server = server;
		this.port = port;
		this.type = type;
	}

	public String getDesc()
	{
		return desc;
	}

	public void setDesc(String desc)
	{
		this.desc = desc;
	}

	public String getServer()
	{
		return server;
	}

	public void setServer(String server)
	{
		this.server = server;
	}

	public int getPort()
	{
		return port;
	}

	public void setPort(int port)
	{
		this.port = port;
	}

	public String getType()
	{
		return type;
	}

	public void setType(String type)
	{
		this.type = type;
	}

	@Override
	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		if (this.server != null)
		{
			sb.append("IP：" + server + "\r");
		}
		if (this.port != -1)
		{
			sb.append("Port：" + port + "\r");
		}
		if (this.type != null)
		{
			sb.append("Type：" + type + "\r");
		}
		if (this.desc != null)
		{
			sb.append("Desc：" + desc + "\r");
		}
		if (this.advice != null)
		{
			sb.append("Advice：" + advice + "\r");
		}
		if (this.response != null)
		{
			sb.append("Response：" + response + "\r");
		}
		return sb.toString();
	}
}
